<?php
class Book extends AppModel {
	var $name = 'Book';
	var $displayField = 'title';
	//The Associations below have been created with all possible keys, those that are not needed can be removed
	
	var $hasAndBelongsToMany = array(
		'Authors' => array(
			'className' => 'Author',
			'joinTable' => 'books_authors_link',
			'foreignKey' => 'book',
			'associationForeignKey' => 'author',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		),
		'Ratings' => array(
			'className' => 'Rating',
			'joinTable' => 'books_ratings_link',
			'foreignKey' => 'book',
			'associationForeignKey' => 'rating',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		),
		'Series' => array(
			'className' => 'Serie',
			'joinTable' => 'books_series_link',
			'foreignKey' => 'book',
			'associationForeignKey' => 'series',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		),
		'Tags' => array(
			'className' => 'Tag',
			'joinTable' => 'books_tags_link',
			'foreignKey' => 'book',
			'associationForeignKey' => 'tag',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		),
		'Publishers' => array(
			'className' => 'Publisher',
			'joinTable' => 'books_publishers_link',
			'foreignKey' => 'book',
			'associationForeignKey' => 'publisher',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		),
	);
	var $hasOne = array(
		'Comments' => array(
			'className' => 'Comment',
			'conditions' => '',
			'foreignKey' => 'book'	
		)
	);
	
	var $hasMany = array(
		'Datas' => array(
			'className' => 'Data',
			'conditions' => '',
			'foreignKey' => 'book'	
		),
		'Identifiers' => array(
			'className' => 'Identifier',
			'conditions' => '',
			'foreignKey' => 'book'	
		)
	);
}
?>